import Vue from 'vue'

import {
  ToastPlugin,
  LoadingPlugin,
  AlertPlugin,
  XDialog,
  ConfirmPlugin
} from 'vux'


let newVar = [
  ToastPlugin,
  LoadingPlugin,
  AlertPlugin,
  XDialog,
  ConfirmPlugin
];
const components = newVar;

components.forEach((item) => {
  if (item.name !== undefined) Vue.component(item.name, item);
});

Vue.use(ToastPlugin);
Vue.use(LoadingPlugin);
Vue.use(AlertPlugin);
Vue.use(ConfirmPlugin);